package com.wx.algorithm;

import com.wx.CommonUtils;

public class Daily {

    /**
     * 台阶问题
     * 每次走一步或者两步
     *
     * @param n
     * @return
     */
    public static int getStep(int n) {
        if (n == 1) {
            return 1;
        }
        if (n == 2) {
            return 2;
        }
        return getStep(n - 1) + getStep(n - 2);
    }

    public static void main(String[] args) {
        CommonUtils.printInt(getStep(6));
    }
}
